package com.shqcjd.preinstallglass.ui.adapter;

import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shqcjd.preinstallglass.R;
import com.shqcjd.preinstallglass.model.pojo.RouteListBean;

import butterknife.BindView;
import butterknife.ButterKnife;

public class RouteAdapter extends BaseQuickAdapter<RouteListBean.ItemsBean,RouteAdapter.ViewHolder> {
    public RouteAdapter() {
        super(R.layout.item_route);
    }

    @Override
    protected void convert(ViewHolder helper, RouteListBean.ItemsBean item) {
        helper.tv_name.setText(item.name);
        helper.tv_info.setText(item.lastpatrolinfo);
        helper.tv_tag.setText((helper.getAdapterPosition()+1)+"");
    }


    class ViewHolder extends BaseViewHolder {
        @BindView(R.id.tv_name)
        TextView tv_name;
        @BindView(R.id.tv_info)
        TextView tv_info;
        @BindView(R.id.tv_tag)
        TextView tv_tag;

        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }

}
